-- GENERATED SPELL FOR [Grand Necrolord Antiok] --


function spell0_28006(pUnit, Event) --@Flesh Harvest,n/a--
pUnit:FullCastSpellOnTarget(50501,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28006', 535, 1)
end

function spell1_28006(pUnit, Event) --@Scream of Chaos,Self--
pUnit:FullCastSpellOnTarget(50497,pUnit)
pUnit:RegisterEvent('Sorts_28006', 10000, 1)
end

function spell2_28006(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(50455,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28006', 2000, 1)
end

function spell3_28006(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(55984,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28006', 12500, 1)
end

function spell4_28006(pUnit, Event) --@Shroud of Lightning,Self--
pUnit:FullCastSpellOnTarget(50494,pUnit)
pUnit:RegisterEvent('Sorts_28006', 558, 1)
end

function Sorts_28006(pUnit, Event)
local choix_sorts_28006 = math.random(0, 4)
if choix_sorts_28006 == 0 then
pUnit:RegisterEvent('spell0_28006', 1, 1)
end
if choix_sorts_28006 == 1 then
pUnit:RegisterEvent('spell1_28006', 1, 1)
end
if choix_sorts_28006 == 2 then
pUnit:RegisterEvent('spell2_28006', 1, 1)
end
if choix_sorts_28006 == 3 then
pUnit:RegisterEvent('spell3_28006', 1, 1)
end
if choix_sorts_28006 == 4 then
pUnit:RegisterEvent('spell4_28006', 1, 1)
end
end

function mob28006_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28006', math.random(1500, 3000), 1)
end

function mob28006_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28006_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28006_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28006, 1, 'mob28006_Action')
RegisterUnitEvent(28006, 2, 'mob28006_Leave')
RegisterUnitEvent(28006, 3, 'mob28006_Kill')
RegisterUnitEvent(28006, 4, 'mob28006_Die')
